import { Request, Response, NextFunction } from 'express';

export const NotFoundMiddleware = (req: Request, res: Response, _next: NextFunction) => {
  if (res.headersSent) return;
  return res.status(404).json({
    code: 404,
    message: `[${req.method}] => ${req.path} not found`,
  });
};
